.el-button {
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 4px;
}
// 自定义弹框样式
.el-dialog {
  border-radius: 6px;
  .el-dialog__headerbtn {
    width: 14px;
    height: 14px;
    top: 20px;
    right: 20px;
  }
}
.el-dialog__header {
  border-bottom: 1px solid #ebeef5;
  margin-right: 0;
  padding: 12px 20px;
  .el-dialog__title,
  .title {
    display: flex;
    align-items: center;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: $--font-size-large;
    &::before {
      content: "";
      width: 4px;
      height: 12px;
      background: $--color-primary;
      border-radius: 0 2px 2px 0;
      margin-right: 10px;
    }
  }
}
.el-overlay-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  .el-dialog {
    margin: 0 auto !important;
    .el-dialog__body {
      padding: 10px 20px;
      max-height: 85vh;
      overflow-y: auto;
      overflow-x: hidden;
    }
    .el-dialog__footer {
      border-top: 1px solid #ebeef5;
      padding-bottom: 12px;
      padding-top: 12px;
    }
    &.max-height-body {
      .el-dialog__body {
        height: 85vh;
        max-height: 85vh;
      }
    }
  }
}

// 自定义TAG去除边框
.el-tag--light {
  border: none;
}
.el-tag--default.el-tag--light {
  border: 1px solid #d6e7ff;
}
.el-tag.el-tag--light[cancel] {
  color: #ccc;
  background: #f0f0f0;
}

// 自定义Button去边框
.el-button.is-plain {
  border: none;
}
.el-button--primary.push-btn.is-disabled {
  color: #fff;
  background: #cfd3d9;
  border: 1px solid #cfd3d9;
  &:hover,
  &:focus,
  &:active {
    background: #cfd3d9;
    color: #fff;
  }
}
.el-button[cancel]:not(.is-text) {
  color: #999;
  background: #f5f7fa;
  border: 1px solid #f5f7fa;
  &:hover,
  &:focus,
  &:active {
    border-color: var(--el-button-hover-bg-color);
  }
}
.el-badge {
  font-size: 0;
}
.el-button.is-text {
  background: transparent;
  padding: 0;
  height: 14px;
  line-height: 14px;
  vertical-align: middle;
  &:hover {
    background: transparent !important;
  }
  &.el-button--primary.is-disabled {
    color: #a5a9af !important;
  }
}
.el-button--primary.is-text.is-disabled,
.el-button--primary.is-text[cancel] {
  color: #a5a9af;
  &:hover {
    background: transparent;
    color: #a5a9af;
  }
}
.el-button[not-allow] {
  cursor: not-allowed;
}
.el-button.is-text:not(.is-disabled):hover,
.el-button.is-text:not(.is-disabled):focus {
  background: none;
}

// 表格样式修改
.el-table {
  .el-table__empty-block + .el-table__append-wrapper {
    display: none;
  }
  &.is-scrolling-middle,
  &.is-scrolling-right {
    .el-table-fixed-column--left.is-last-column::before {
      border-left: 1px solid #e5e5e5 !important;
      box-shadow: none !important;
    }
  }
  &.el-table--small {
    font-size: var(--font-size-min);
    .el-table__cell {
      padding: 4px 0;
    }
  }
  td.td-border {
    border-right: 1px solid #ebeef5;
    position: relative;
    height: 100%;
    .cell {
      height: 100%;
    }
  }
  th.el-table__cell {
    background: #f5f7fa !important;
    color: $--color-desc;
    font-weight: 400;
  }
  .el-table__cell {
    border-right: 0;
  }
  .el-table__header {
    th:first-child {
      padding-left: 6px;
    }
  }
  .el-table__row {
    td:first-child {
      padding-left: 6px;
    }
  }
  .el-table__inner-wrapper::before {
    bottom: 0;
  }
}
.custom-check {
  line-height: 1.3;
}
.el-col-md-4-8 {
  width: 20%;
  flex: 0 0 20%;
}
.custom-cell {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle !important;
  .cell {
    overflow: inherit;
    height: 100%;
    .el-badge {
      display: flex !important;
    }
    .el-badge__content {
      transform: translateY(-50%) translateX(100%) scale(0.7);
      height: 20px;
      border-radius: 50%;
    }
  }
}
.el-space {
  .el-space__item:last-child {
    margin-right: 0 !important;
  }
}
.el-input-number {
  .el-input__wrapper {
    padding-left: 11px !important;
    padding-right: 11px !important;
  }
  .el-input__inner {
    text-align: left;
  }
}
.selectSmallText {
  .el-select-dropdown__item,
  .el-autocomplete-suggestion__list li {
    font-size: $--font-size-min;
  }
}
.el-pagination.is-background {
  padding-bottom: 0;
  padding-top: 0;
  padding-right: 0;
  .el-pagination__total {
    color: #989da0;
  }
  .el-select {
    width: 100px;
    .el-input {
      width: 100%;
      height: 28px;
      .el-input__wrapper {
        box-shadow: 0 0 0 1px #e5e5e5 inset;
        .el-input__inner {
          color: #4d4d4d;
        }
      }
    }
  }
  .btn-prev,
  .btn-next {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    color: #4d4d4d;
    height: 28px;
    line-height: 28px;
    width: 28px;
    min-width: 28px;
    &:disabled {
      background: #fff;
      color: #eff1f5;
    }
  }
  .el-pager {
    li {
      height: 28px;
      line-height: 28px;
      width: 28px !important;
      box-sizing: border-box;
      min-width: 28px;
      padding: 0 2px;
    }
    li:not(.is-disabled) {
      background: #fff;
      border: 1px solid #e5e5e5;
      border-radius: 4px;
      color: #4d4d4d;
      &.is-active {
        background: #e9f2fe;
        color: #81b5fc;
        border-color: #cae0ff;
      }
    }
  }
}
.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
  background: #e7eaef;
}
.el-table.is-scrolling-right th.el-table-fixed-column--right,
.el-table__header-wrapper tr th.el-table-fixed-column--right,
.el-table.is-scrolling-none th.el-table-fixed-column--left,
.el-table.is-scrolling-none th.el-table-fixed-column--right {
  background: #f5f7fa;
}
.el-table.is-scrolling-left .el-table-fixed-column--right.is-first-column::before,
.el-table.is-scrolling-middle .el-table-fixed-column--right.is-first-column::before {
  box-shadow: none;
  border-left: var(--el-table-border);
  left: 0;
}
.el-table .el-table__body tr {
  height: 40px;
}
.el-tabs__nav-wrap::after {
  height: 1px;
}
.el-checkbox {
  .el-checkbox__input {
    .el-checkbox__inner {
      border-color: #adafb4;
    }
    &.is-disabled {
      .el-checkbox__inner {
        border-color: #dcdfe6;
        background: #eaebee;
      }
    }
    &.is-indeterminate,
    &.is-checked {
      .el-checkbox__inner {
        border-color: $--color-primary;
      }
    }
    //&.is-indeterminate {
    //  .el-checkbox__inner {
    //    &:before {
    //      border-color: $--color-primary;
    //      background: $--color-primary;
    //    }
    //  }
    //}
  }
}
.custom-select-table {
  .el-table-column--selection .cell {
    display: flex !important;
    align-items: center;
  }
}
.disabled-cell {
  * {
    color: #a5a9af;
  }
}
.el-table__empty-block {
  position: absolute;
}
.el-radio-button {
  &.is-active {
    .svg-icon {
      color: var(--color-whites) !important;
    }
  }
  .el-radio-button__inner {
    padding: 5px 8px;
    background: #f5f7fa;
    .svg-icon {
      color: #9ec7ff;
    }
  }
}

// 自定义alert
.is-message-box {
  .el-message-box__container {
    .el-icon.el-message-box__status {
      font-size: var(--font-size-large) !important;
      top: 12px !important;
    }
    .el-message-box__message {
      padding-left: 20px !important;
    }
  }
}
